<template>
  <div>
    <button @click="aaa">{{ title }}</button>
  </div>
</template>

<script>
export default {
  name: "v-button",
  props: ["title"],
  model: {
    prop: "title",
    event: "xxx",
  },
  data() {
    return {
      index: 1,
      origin: "",
    };
  },
  // mounted() {
  //   this.origin = this.title;
  // },
  methods: {
    aaa() {
      let str = this.title.replace(/\d+$/i, "");
      this.$emit("xxx", str + this.index++);
    },
  },
};
</script>

<style scoped>
button {
  width: 150px;
  height: 70px;
  background: #6aacef;
}
</style>
